<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>

        var num = Number(prompt("请输入一个数字"))

        if (num === 1) {
            console.log("哈哈")
        } else if (num === 2) {
            console.log("呵呵");
        } else if (num === 3) {
            console.log("嘿嘿");
        } else {
            console.log("你是个好人");
        }
    </script>
</head>
<body>

</body>
</html>